09. Case Study: Tuning

AI For Trading C6 L3 A06 Case Study- Tuning V2

Hyperparameter Tuning and Model Evaluation in Machine Learning

When training machine learning models, strategic hyperparameter tuning is essential. Before tuning, ensure:

  • Evaluation Metric Selection:

    • Choose a consistent metric. Common ones include accuracy for classification or profit for financial models. Avoid changing metrics mid-process to maintain consistency.
  • Baseline Model Creation:

    • Establish a simple baseline model to compare future models. Examples include random decision output or predicting the majority class from the training dataset.
    • Evaluate the baseline's performance on a test set for initial reference.

Hyperparameter Tuning Techniques:

  1. Manual Tuning:

    • Adjust key hyperparameters based on intuition, e.g., learning rate in logistic regression.
  2. Randomized Search:

    • Explore various hyperparameter spaces. Suitable for large search spaces.
  3. Grid Search:

    • Exhaustively search smaller, promising areas identified from randomized search.
  • Validate models using cross-validation for realistic performance insights.
  • After tuning, evaluate the model on a test set to assess improvements over the baseline.

Iterate as needed, balancing improvements with resource constraints to prevent overfitting. Begin the final evaluation with the strongest candidate model trained on all data.